import request from '../utils/request';
 import praseStrEmpty from '../utils/index'
// export const fetchData = query => {
//     return request({
//         url: './table.json',
//         method: 'get',
//         params: query
//     });
// };
export function getSSSS() {
    return request({
        url: '/test/ssss',
        method: 'get'
    })
}

export function getCounlist() {
    return request({
        url: '/test/getAll',
        method: 'post'
    })
}


export function getTableData(query) {
    return request({
        url: '/test/getTableData',
        method: 'get',
        params:query
    })
}

// 查询用户详细
export function getUser(id) {
    return request({
        url: '/test/getUserbyId/'+id,
        method: 'get',
    })
}
export function selectMatchCxjById(id) {
    return request({
        url: '/matchCxj/selectMatchCxjById/'+id,
        method: 'get',
    })
}


export function updateUser(data) {
    return request({
        url: '/test/updateUser/',
        method: 'post',
        data:data
    })
}
export function updateMatchCxj(data) {
    return request({
        url: '/matchCxj/updateMatchCxj',
        method: 'post',
        data:data
    })
}


export function addUser(data) {
    return request({
        url: '/test/addUser/',
        method: 'post',
        data:data
    })
}

export function addMatchCxj(data) {
    return request({
        url: '/matchCxj/addMatchCxj',
        method: 'post',
        data:data
    })
}

export function delUser(Ids) {
    return request({
        url: '/test/delUser/' + Ids,
        method: 'delete'
    })
}
export function delMatchCxj(Ids) {
    return request({
        url: '/matchCxj/delMatchCxj/' + Ids,
        method: 'delete'
    })
}


export function listmatchCxjByGet(query) {
    return request({
        url: '/matchCxj/selectAllbyGet',
        method: 'get',
        params:query
    })
}
export function listmatchCxjByPost(query) {
    return request({
        url: '/matchCxj/selectAllByPost',
        method: 'post',
        params:query
    })
}
